home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / c / gcc261ud-c.lha / gnu / os-include / inline / console.h < prev    next >
C/C++ Source or Header  |  1994-09-22  |  2KB  |  63 lines

  1. #ifndef _INLINE_CONSOLE_H
  2. #define _INLINE_CONSOLE_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL
  11. #define BASE_EXT_DECL0 extern struct Device * ConsoleDevice;
  12. #endif
  13. #ifndef BASE_PAR_DECL
  14. #define BASE_PAR_DECL
  15. #define BASE_PAR_DECL0 void
  16. #endif
  17. #ifndef BASE_NAME
  18. #define BASE_NAME ConsoleDevice
  19. #endif
  20.  
  21. BASE_EXT_DECL0
  22.  
  23. extern __inline struct InputEvent *
  24. CDInputHandler (BASE_PAR_DECL struct InputEvent *events,struct Library *consoleDevice)
  25. {
  26.   BASE_EXT_DECL
  27.   register struct InputEvent * _res  __asm("d0");
  28.   register struct Device *a6 __asm("a6") = BASE_NAME;
  29.   register struct InputEvent *a0 __asm("a0") = events;
  30.   register struct Library *a1 __asm("a1") = consoleDevice;
  31.   __asm __volatile ("jsr a6@(-0x2a)"
  32.   : "=r" (_res)
  33.   : "r" (a6), "r" (a0), "r" (a1)
  34.   : "a0","a1","d0","d1", "memory");
  35.   return _res;
  36. }
  37. extern __inline LONG 
  38. RawKeyConvert (BASE_PAR_DECL struct InputEvent *events,STRPTR buffer,long length,struct KeyMap *keyMap)
  39. {
  40.   BASE_EXT_DECL
  41.   register LONG  _res  __asm("d0");
  42.   register struct Device *a6 __asm("a6") = BASE_NAME;
  43.   register struct InputEvent *a0 __asm("a0") = events;
  44.   register STRPTR a1 __asm("a1") = buffer;
  45.   register long d1 __asm("d1") = length;
  46.   register struct KeyMap *a2 __asm("a2") = keyMap;
  47.   __asm __volatile ("jsr a6@(-0x30)"
  48.   : "=r" (_res)
  49.   : "r" (a6), "r" (a0), "r" (a1), "r" (d1), "r" (a2)
  50.   : "a0","a1","a2","d0","d1", "memory");
  51.   return _res;
  52. }
  53.  
  54. #undef BASE_EXT_DECL
  55. #undef BASE_EXT_DECL0
  56. #undef BASE_PAR_DECL
  57. #undef BASE_PAR_DECL0
  58. #undef BASE_NAME
  59.  
  60. __END_DECLS
  61.  
  62. #endif /* _INLINE_CONSOLE_H */
  63.